CircuitPython on Raspberry Pi Pico

CircuitPython allows you control a variety of components on the Raspberry Pi Pico

CircuitPython is a version of the Python programming language designed to work on microcontroller boards such as the Raspberry Pi Pico.


Install CircuitPython

To install CircuitPython on your Pico W first download the latest version onto your computer from here.

Note that if you are using the non-Wifi Pico, you need a different UF2 file from here: here.

With the Pico unplugged from power, press and hold the BOOTSEL button.

Bootsel

Then plug the Pico into your USB cable connected to your computer. You should see the RPI-RP2 drive appear on your computer (use Windows Explorer or Mac Finder to see it), e.g:

Rpi rp2

Now drag the UF2 file you downloaded to the RPI-RP2 drive. The file will be downloaded to the Pico and after a short delay a new drive called CIRCUITPYTHON will appear, e.g:

Circuitpy dir
Note that CircuitPython is similar (but different) to MicroPython. We recomment CircuitPython over Micropython as there is a bigger range of libraries available, allowing you to drive a greater variety of components easily.


Download the CircuitPython libraries

Various devices and services are supported by CircuitPython. You will need different libraries depending on the needs of your project. Get the latest version of the CircuitPython Libraries from here.

Make sure you get the bundle that matches the version of CircuitPython you installed. So if you installed version 8.x of CircuitPython, download version 8.x of the library bundle.

Keep the bundle on your computer. You only need to copy the specific libraries you need for your project, as detailed in the subsequent worksheets.

Download my CircuitPython samples

I’ve provided examples to go with the subsequent worksheets. You can download this code from here.

If you want to try all the example recipes you can copy this entire set of files to your pico.

Read the CircuitPython documentation

As you develop different projects you will inevitably need some help! Check out the CircuitPython documentation here: here.